home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 49
/
Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso
/
-in_the_mag-
/
banging_the_metal
/
cd32
/
nvtools
/
unsetnv.mod
< prev
Wrap
Text File
|
1999-11-30
|
851b
|
53 lines
MODULE UnsetNV;
(*
$StackChk-
$RangeChk-
$NilChk-
$OvflChk-
$ReturnChk-
$CaseChk-
*)
IMPORT
y := SYSTEM,
(* Interfaces *)
d := Dos,
e := Exec,
nv := NonVolatile,
str := Strings;
CONST
template = "AN=APPNAME/A,ITEMNAME/A,KR=KILLREQUESTER/S"
"\o$VER: UnsetNV.mod 1.0 (30.09.95)";
TYPE
Args = STRUCT (as :d.ArgsStruct)
appName :d.ArgString;
itemName :d.ArgString;
killReq :d.ArgBool;
END;
VAR
args :d.RDArgsPtr;
argv :Args;
BEGIN
IF nv.base=NIL THEN
d.PrintF("No nonvolatile.library!\n");
HALT(20);
END;
args := d.ReadArgs(template, argv, NIL);
IF args=NIL THEN
IF d.PrintFault(d.IoErr(), "UnsetNV") THEN END;
HALT(20);
END;
IF nv.DeleteNV(argv.appName^, argv.itemName^, argv.killReq) THEN HALT(5) END;
CLOSE
d.FreeArgs(args);
END UnsetNV.